-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tan De Jun] iP #49
base: master
Are you sure you want to change the base?
[Tan De Jun] iP #49
Conversation
Amended previous Increments to resolve case "bye" printing issue
src/main/java/Duke.java
Outdated
|
||
System.out.println("____________________________________________________________"); | ||
|
||
if (input.equals("list")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better as a constant instead of a magic string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it would. Must have overlooked it thanks for pointing it out! :)
src/main/java/Duke.java
Outdated
String input = sc.nextLine(); | ||
String[] inputArray = input.split(" ", 2); | ||
|
||
System.out.println("____________________________________________________________"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to put this in a method (for example displayLine()) instead of a magic string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats a great idea. Will implement it into my code 👍
src/main/java/Duke.java
Outdated
public class Duke { | ||
public static void main(String[] args) { | ||
welcomeMessage(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think printWelcomeMessage() would be a better name than welcomeMessage() as it is a verb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh you are right. It would be clearer to the user as well. Thanks!
src/main/java/Duke.java
Outdated
|
||
Scanner sc = new Scanner(System.in); | ||
List<Task> tasks = new ArrayList<Task>(); | ||
Boolean exitProgram = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to be called isExitCommandUsed instead of exitProgram as a boolean variable?
Merge Branch-A-JavaDoc
Merge branch-A-UserGuide into Master
No description provided.